Japanese unexamined patent application publication No. JP-A-H10-149059 describes a related art image forming apparatus. The related art image forming apparatus is configured to scan a laser beam in a main scanning direction so as to expose a photosensitive member, and forms an electrostatic image on the photosensitive member to form an image. In the related art image forming apparatus, the photosensitive member is mounted in a process cartridge so that the photosensitive member can be replaced together with the process cartridge. In the related art image forming apparatus, the quality of images can be maintained by replacing process cartridges according to their service lives. However, the related art image forming apparatus cannot form an image under an uncompleted attachment condition as in which the attachment of the process cartridge is forgotten. In addition, although the related art image forming apparatus can be modified to form a multi-color image, the color type related art image forming apparatus cannot form an image in desired colors under an erroneous attachment condition in which an error is made in arranging process cartridges provided color by color in their proper position.
Therefore, the related art image forming apparatus has a shutter which is opened and closed by attachment and detachment of a process cartridge in an optical path directed to a so-called BD sensor for detecting a scanning origin of a laser beam which is scanned described above. In this case, it is presumed that the process cartridge is not attached when the shutter is closed so that the laser beam cannot be detected by the BD sensor, and the relate art image forming apparatus does an appropriate process such as displaying an error message.